package com.bdqn.zhao.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bdqn.zhao.dao.IpRoomMapper;
import com.bdqn.zhao.pojo.IpRoom;
import com.bdqn.zhao.service.IpRoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpSession;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

/**
 * <p>
 * 园区表 服务实现类
 * </p>
 *
 * @author zhangsan
 * @since 2023-04-24
 */
@Service
public class IpRoomServiceImpl extends ServiceImpl<IpRoomMapper, IpRoom> implements IpRoomService {


    @Autowired
    private IpRoomMapper ipRoomMapper;

    LocalDate date = LocalDate.now();
    DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");

    @Override
    public String selectAll(HttpSession session) {


        // 1。全查类别
//        Page<IpRoom> page = new Page<>(1, 3);//设置分页参数
//        QueryWrapper<User> wrapper = new QueryWrapper<>();
//        wrapper.leftJoin("t_order", "user_id = id");
//        IPage<IpRoom> parkIPage = ipRoomMapper.selectPage(page, ipRoomMapper.selectALla());
//        List<IpRoom> ipParks1 = parkIPage.getRecords();//查询到的分页数据
//        session.setAttribute("ipParkList", ipParks1);
//        session.setAttribute("ipParkCount", ipParks1.size());
//
//        //当前页数
//        session.setAttribute("current", page.getCurrent());
//        session.setAttribute("pages", page.getPages());
//        return ipParks1;


//        List<IpFloor> ipFloors = ipFloorMapper.selectALla();
//        session.setAttribute("ipFloorsList",ipFloors);
//        return "true";
        return "";
    }



}
